Dummy app test setup improvements #57
Open
+35
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I struggled a bit getting the dummy app test suite running locally. The commands in the GitHub Actions config file didn’t work for me for a variety of reasons, probably due to Bundler version and configuration differences and having
asdf
in the mix. Once I got it working on my machine, I moved the commands intobin/dummy-app-setup
and modified the GitHub Actions workflow to call this script.I think this dummy app setup script is more general and can now be called locally on anyone’s machine to prepare the dummy app for running the test suite. I changed the directory structure created slightly to ensure that the gem’s development dependencies, the
rails
gem installation used to callrails new
, and the dummy app gem dependencies are all firewalled off from each other. This doesn’t matter when running via GitHub Actions, but was a big part of the problem when trying to run locally. The modified directory structure also allows dummy apps for multiple versions of Rails to coexist inspec/tmp/dummy_app-rails-VERSION/dummy_app
.It’s possible these changes might be depending on quirks of my own local development environment, though, so I’m not sure if this will run correctly on GitHub Actions or your own machine. But if the kinks can be worked out I think this will improve the development experience for anyone else contributing!